﻿@{
    ViewBag.Title = "AGVManagement";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
    ViewBag.PageTitle = "AGV系统";
    ViewBag.PageColumn = "AGV管理";
}
<link href="~/Content/AGVManagement.css" rel="stylesheet" />
<div class="count-panel" style="width:100%;margin:0px auto;">
    <div class="x_title">
        <div class="clearfix">
            <div class="panel-body" style="padding:0px;">
                <form id="formSearch" class="form-horizontal">
                    <div class="panel panel-default">
                        <div class="panel-heading " id="pal-text"><span class="glyphicon glyphicon-filter" aria-hidden="true"></span>&nbsp;查询条件<span style="float:right;"><a href="javascript:;" style="text-decoration:none" class="Inquire-text" id="btn_query"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;查询</a></span></div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="control-label col-sm-1" for="txt_search_rolename">AGV编号</label>
                                <div class="col-sm-3">
                                    <input type="text" id="AGVNumber" class="form-control">
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
                <div class="panel panel-default">
                    <div class="panel-heading" id="pal-text"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span>&nbsp;数据列表</div>
                    <div class="panel-body" style="padding:10px;">
                        <div id="toolbar" class="btn-group">
                            <button id="btn_add" type="button" class="btn btn-default">
                                <span class="glyphicon glyphicon-plus" aria-hidden="true" style="font-size:10px;"></span>&nbsp;新增
                            </button>
                            <button id="btn_edit" type="button" class="btn btn-default">
                                <span class="glyphicon glyphicon-pencil" aria-hidden="true" style="font-size:10px;"></span>&nbsp;修改
                            </button>
                            <button id="btn_delete" type="button" class="btn btn-default">
                                <span class="glyphicon glyphicon-remove" aria-hidden="true" style="font-size:10px;"></span>&nbsp;删除
                            </button>
                        </div>
                        <table id="tb_report"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<form>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="txt_rolename">AGV编号</label>
                        <input type="text" name="agvNum" class="form-control" id="agvNum" placeholder="AGV编号">
                        <input id="agvId" class="form-control" type="hidden" />
                    </div>
                    <div class="form-group">
                        <label for="txt_rolename">序列号</label>
                        <input type="text" name="agvSerialNum" class="form-control" id="agvSerialNum" placeholder="AGV序列号">
                    </div>
                    <div class="form-group">
                        <label for="txt_defaulturl">IP地址</label>
                        <input type="text" name="agvIp" class="form-control" id="agvIp" placeholder="IP地址">
                    </div>
                    <div class="form-group">
                        <label for="txt_defaulturl_Web">端口号</label>
                        <input type="text" name="agvPort" class="form-control" id="agvPort" placeholder="端口号">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
                    <button type="button" id="btn_submit" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
                </div>
            </div>
        </div>
    </div>
</form>
<div class="modal  fade bs-example-modal-lg" id="AGVControl" tabindex="-1" role="dialog" aria-labelledby="AGVtitle">
    <div class="modal-dialog modal-lg modal-text" style="width:95%;" role="document">
        <div class="modal-content">
            <div class="modal-header" style="padding:10px;">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="agvclose()"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="AGVtitle"></h4>
            </div>
            <div class="modal-body" style="background: #EDEDED;padding:6px 10px;overflow:hidden;">
                <div>
                    <div class="count-Left">
                        <div class="count-panel" style="width:100%;margin:0px auto;">
                            <div class="x_title">
                                <h2 style="font-size:18px;">基本信息</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix">
                                <div style="width:100%;">
                                    <ul class="Control-li" style="display:block;height:50px;">
                                        <li class="Contro-counts">AGV编号</li>
                                        <li class="Contro-info" id="agvNu">0号</li>
                                        <li class="Contro-counts">固件版本</li>
                                        <li class="Contro-info" id="agvFirmware">V0.0.0</li>
                                    </ul>
                                    <ul class="Control-li" style="display:block;height:50px;margin-top:15px;">
                                        <li class="Contro-counts">二维码</li>
                                        <li class="Contro-info" id="qrcode">00000</li>
                                        <li class="Contro-counts">状态</li>
                                        <li style="color:red" class="Contro-info" id="agvIsRunning">离线</li>
                                    </ul>
                                    <ul class="Control-li" style="display:block;height:50px;margin-top:15px;">
                                        <li class="Contro-counts">PBS</li>
                                        <li class="Contro-info" id="PBS">区域0</li>
                                        <li class="Contro-counts">云台</li>
                                        <li class="Contro-info" id="agvHolder">下降</li>
                                    </ul>
                                    <ul class="Control-li" style="display:block;height:50px;margin-top:15px;">
                                        <li class="Contro-counts">报警信息</li>
                                        <li class="Contro-info Info-nav" style="color:#139656" id="Message">正常</li>
                                    </ul>
                                </div>
                                <div style="margin-top:30px;">
                                    <ul class="Control-li" style="display:block;height:50px;">
                                        <li style="padding:8px;padding-left:0px;"><button type="button" class="btn btn-danger" style="width:100%;height:45px;" onclick="Scram()">急停</button></li>
                                        <li style="padding:8px"><button type="button" class="btn btn-primary" style="width:100%;height:45px;" onclick="ManualSelfMotion()">手动</button></li>
                                        <li style="padding:8px"><button type="button" class="btn btn-primary" style="width:100%;height:45px;" onclick="Restoration()">复位</button></li>
                                        <li style="padding:8px;padding-right:0px;"><button type="button" class="btn btn-primary" style="width:100%;height:45px;">固件升级</button></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="count-panel" style="width:100%;margin:0px auto;margin-top:4px;">
                            <div class="x_title">
                                <h2 style="font-size:18px;">AGV状态</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix">
                                <ul>
                                    <li style="width:50%;height:200px;float:left" id="container-speed"></li>
                                    <li style="width:50%;height:200px;float:left" id="container-rpm"></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="count-right">
                        <div class="count-panel" style="width:100%;margin:0px auto;">
                            <div class="x_title">
                                <h2 style="font-size:18px;">AGV控制</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix">
                                <div style="height:50%;overflow:hidden;">
                                    <div class="agv-infos-left">
                                        <img src="~/image/agv-on.gif" style="height:250px;margin:0px auto;" id="agvimg" />
                                        <span style="position:absolute;top:40px;left:0%;text-align:center;width:100%;"><span style="font-size:20px;color:white;font-weight:bold;font-family:'微软雅黑';padding:0px 8px;border:1px solid white;border-radius:5%" id="agvNums"></span></span>
                                        <span style="position:absolute;top:190px;left:0%;text-align:center;width:100%;"><span style="font-size:20px;color:white;font-weight:bold;font-family:'微软雅黑';" id="agvsNumer"></span></span>
                                    </div>
                                    <div class="agv-infos-Right">
                                        <ul style="margin-top:60px;">
                                            <li style="text-align:center"><button type="button" onclick="agvstarts()" class="btn btn-primary" style="width:100%;height:45px;max-width:250px;">启动</button></li>
                                            <li style="margin-top:50px;text-align:center"><button type="button" class="btn btn-primary" style="width:100%;height:45px;max-width:250px;" onclick="agvstop()">停止</button></li>
                                        </ul>
                                    </div>
                                </div>
                                <div style="width:100%;margin-top:40px;">
                                    <ul>
                                        <li style="height:32px;">
                                            <div style="width:80%;float:left;">
                                                <div class="form-group">
                                                    <div class="input-group">
                                                        <span class="input-group-addon" id="basic-addon2">PBS：</span>
                                                        <select id="PBS" class="selectpicker show-tick form-control" data-live-search="false" aria-describedby="basic-addon2">
                                                            <option value="0">区域0</option>
                                                            <option value="1">区域1</option>
                                                            <option value="2">区域2</option>
                                                            <option value="3">区域3</option>
                                                            <option value="4">区域4</option>
                                                            <option value="5">区域5</option>
                                                            <option value="6">区域6</option>
                                                            <option value="7">区域7</option>
                                                            <option value="8">区域8</option>
                                                            <option value="9">区域9</option>
                                                            <option value="10">区域10</option>
                                                            <option value="11">区域11</option>
                                                            <option value="12">区域12</option>
                                                            <option value="13">区域13</option>
                                                            <option value="14">区域14</option>
                                                            <option value="15">区域15</option>
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                            <div style="width:20%;float:right;padding:0px 9px;">
                                                <button type="button" class="btn btn-primary" style="width:100%;height:32px;max-width:250px;" onclick="UpdatePBS()">修改</button>
                                            </div>
                                        </li>
                                        <li style="margin-top:50px;text-align:center;overflow:hidden;">
                                            <button type="button" class="btn btn-primary" style="width:49%;height:45px;float:left" onclick="DeckRise()">云台上升</button>
                                            <button type="button" class="btn btn-primary" style="width:49%;height:45px;float:right" onclick="DeckDecline()">云台下降</button>
                                        </li>
                                        <li style="margin-top:50px;text-align:center;overflow:hidden">
                                            <button type="button" class="btn btn-primary" style="width:49%;height:45px;float:left;" onclick="LeftTurn()">左转</button>
                                            <button type="button" class="btn btn-primary" style="width:49%;height:45px;float:right" onclick="rightTurn()">右转</button>
                                        </li>
                                        <li style="margin-top:50px;">
                                            <div style="width:80%;float:left;">
                                                <div class="form-group">
                                                    <div class="input-group">
                                                        <span class="input-group-addon" id="basic-addon2">速度：</span>
                                                        <select class="selectpicker show-tick form-control" aria-describedby="basic-addon2" data-live-search="false" id="speed">
                                                            <option value="1">0：5</option>
                                                            <option value="2">1：0</option>
                                                            <option value="3">2：15</option>
                                                            <option value="4">3：20</option>
                                                            <option value="5">4：25</option>
                                                            <option value="6">5：30</option>
                                                            <option value="7">6：35</option>
                                                            <option value="8">7：40</option>
                                                            <option value="9">8：50</option>
                                                            <option value="10">9：30</option>
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                            <div style="width:20%;float:right;padding:0px 9px;">
                                                <button type="button" class="btn btn-primary" style="width:100%;height:32px;max-width:250px;" onclick="UpdateSpeed()">修改</button>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="~/Scripts/Equipment/AGVManagement.js"></script>